package cn.iocoder.yudao.module.resource.api;

import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.resource.api.model.gamematches.GameMatchesDTO;
import cn.iocoder.yudao.module.resource.api.model.gamematches.GameMatchesSaveReqDTO;
import cn.iocoder.yudao.module.resource.controller.admin.gamematches.vo.GameMatchesSaveReqVO;
import cn.iocoder.yudao.module.resource.service.gamematches.GameMatchesService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class GameMatchesApiImpl implements IGameMatchesApi {
    @Resource
    private GameMatchesService gameMatchesService;

    @Override
    public String createGameMatches(GameMatchesSaveReqDTO createReqVO) {
        return gameMatchesService.createGameMatches(BeanUtils.toBean(createReqVO, GameMatchesSaveReqVO.class));
    }

    @Override
    public void updateGameMatches(GameMatchesSaveReqDTO updateReqVO) {
        gameMatchesService.updateGameMatches(BeanUtils.toBean(updateReqVO, GameMatchesSaveReqVO.class));
    }

    @Override
    public GameMatchesDTO getGameMatches(Long userId, String id) {
        return BeanUtils.toBean(gameMatchesService.getGameMatches(userId, id), GameMatchesDTO.class);
    }
}


